package bb.lanxing.lib.devices.sgsettingentity.gearprofile;

import java.io.Serializable;

import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import kotlin.jvm.internal.Intrinsics;

public final class Gear implements Parcelable, Serializable {
    private Boolean activated;
    private String brand;
    private int gid;
    private String manufacturer;
    private String model;
    private String name;
    private String type;
    private int weight;
    private int wheel_size;

    public Gear(Boolean activated, int gid, String manufacturer, String model, String name, String type,
                int weight, int wheel_size, String brand) {
        this.activated = activated;
        this.gid = gid;
        this.manufacturer = manufacturer;
        this.model = model;
        this.name = name;
        this.type = type;
        this.weight = weight;
        this.wheel_size = wheel_size;
        this.brand = brand;
    }


    protected Gear(Parcel in) {
        byte tmpActivated = in.readByte();
        activated = tmpActivated == 0 ? null : tmpActivated == 1;
        brand = in.readString();
        gid = in.readInt();
        manufacturer = in.readString();
        model = in.readString();
        name = in.readString();
        type = in.readString();
        weight = in.readInt();
        wheel_size = in.readInt();
    }

    public static final Creator<Gear> CREATOR = new Creator<Gear>() {
        @Override
        public Gear createFromParcel(Parcel in) {
            return new Gear(in);
        }

        @Override
        public Gear[] newArray(int size) {
            return new Gear[size];
        }
    };

/*
    public final Gear copy(Boolean bool, Integer num, String str, String str2, String str3, String str4, Integer num2,
                           Integer num3, String str5) {
        return new Gear(bool, num, str, str2, str3, str4, num2, num3, str5);
    }
*/

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Gear)) {
            return false;
        }
        Gear gear = (Gear) obj;
        return Intrinsics.areEqual(this.activated, gear.activated) && Intrinsics.areEqual(this.gid, gear.gid)
                && Intrinsics.areEqual(this.manufacturer, gear.manufacturer)
                && Intrinsics.areEqual(this.model, gear.model) && Intrinsics.areEqual(this.name, gear.name)
                && Intrinsics.areEqual(this.type, gear.type) && Intrinsics.areEqual(this.weight, gear.weight)
                && Intrinsics.areEqual(this.wheel_size, gear.wheel_size) && Intrinsics.areEqual(this.brand, gear.brand);
    }
/*
    public int hashCode() {
        Boolean bool = this.activated;
        int i = 0;
        int hashCode = (bool == null ? 0 : bool.hashCode()) * 31;
        Integer num = this.gid;
        int hashCode2 = (hashCode + (num == null ? 0 : num.hashCode())) * 31;
        String str = this.manufacturer;
        int hashCode3 = (hashCode2 + (str == null ? 0 : str.hashCode())) * 31;
        String str2 = this.model;
        int hashCode4 = (hashCode3 + (str2 == null ? 0 : str2.hashCode())) * 31;
        String str3 = this.name;
        int hashCode5 = (hashCode4 + (str3 == null ? 0 : str3.hashCode())) * 31;
        String str4 = this.type;
        int hashCode6 = (hashCode5 + (str4 == null ? 0 : str4.hashCode())) * 31;
        Integer num2 = this.weight;
        int hashCode7 = (hashCode6 + (num2 == null ? 0 : num2.hashCode())) * 31;
        Integer num3 = this.wheel_size;
        int hashCode8 = (hashCode7 + (num3 == null ? 0 : num3.hashCode())) * 31;
        String str5 = this.brand;
        if (str5 != null) {
            i = str5.hashCode();
        }
        return hashCode8 + i;
    }*/

    public String toString() {
        return "Gear(activated=" + this.activated + ", gid=" + this.gid + ", manufacturer=" + this.manufacturer
                + ", model=" + this.model + ", name=" + this.name + ", type=" + this.type + ", weight=" + this.weight
                + ", wheel_size=" + this.wheel_size + ", brand=" + this.brand + ')';
    }

    public final Boolean getActivated() {
        return this.activated;
    }

    public final void setActivated(Boolean bool) {
        this.activated = bool;
    }

    public final int getGid() {
        return this.gid;
    }

    public final void setGid(int num) {
        this.gid = num;
    }

    public final String getManufacturer() {
        return this.manufacturer;
    }

    public final void setManufacturer(String str) {
        this.manufacturer = str;
    }

    public final String getModel() {
        return this.model;
    }

    public final void setModel(String str) {
        this.model = str;
    }

    public final String getName() {
        return this.name;
    }

    public final void setName(String str) {
        this.name = str;
    }

    public final String getType() {
        return this.type;
    }

    public final void setType(String str) {
        this.type = str;
    }

    public final int getWeight() {
        return this.weight;
    }

    public final void setWeight(int num) {
        this.weight = num;
    }

    public final int getWheel_size() {
        return this.wheel_size;
    }

    public final void setWheel_size(int num) {
        this.wheel_size = num;
    }

    public final String getBrand() {
        return this.brand;
    }

    public final void setBrand(String str) {
        this.brand = str;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
            dest.writeBoolean(activated);
        }
        dest.writeString(brand);
        dest.writeInt(gid);
        dest.writeString(manufacturer);
        dest.writeString(model);
        dest.writeString(name);
        dest.writeString(type);
        dest.writeInt(weight);
        dest.writeInt(wheel_size);
    }
}
